#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QVBoxLayout>
#include <QLabel>
#include <QPushButton>


MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // 创建开始游戏按钮
    QPushButton *startButton = new QPushButton("Start Game");
    connect(startButton, &QPushButton::clicked, this, &MainWindow::startGame);

    // 设置布局
    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(startButton);

    QWidget *centralWidget = new QWidget;
    centralWidget->setLayout(layout);
    setCentralWidget(centralWidget);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::startGame()
{
    // 创建 Wordle 游戏界面
    wordleGame = new WordleGame;
    setCentralWidget(wordleGame);
}
